@using MudBlazor

<MudPaper class="d-flex align-center mb-2 px-4 py-2">
    @if (UseGrid)
    {
        <MudGrid>
            <MudItem xs="12" md="2" lg="1">
                <MudText Typo="Typo.h6" Style="white-space:nowrap;">
                    @Title
                </MudText>
                <MudSpacer />
            </MudItem>
            <MudItem xs="12" md="10" lg="11">
                @ChildContent
            </MudItem>
        </MudGrid>
    }
    else
    {
        <MudText Typo="Typo.h6" Style="white-space:nowrap;">
            @Title
        </MudText>
        <MudSpacer />
        @ChildContent
    }
    
</MudPaper>

@code {

    [Parameter] public string? Title { get; set; }

    [Parameter] public bool UseGrid { get; set; } = true;

    [Parameter] public RenderFragment? ChildContent { get; set; }
}
